home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 November / Chip Kasım 2000.iso / prog / share / 11 / setup.exe / %MAINDIR% / DEMOS / CIHTTP / HTTPEXP / servers / discon.frm (.txt) next >
Encoding:
Visual Basic Form  |  2000-09-07  |  4.4 KB  |  139 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
  3. Begin VB.Form Disconnect 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Disconnect HTTP Server"
  6.    ClientHeight    =   2175
  7.    ClientLeft      =   1695
  8.    ClientTop       =   2295
  9.    ClientWidth     =   5280
  10.    Icon            =   "Discon.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    PaletteMode     =   1  'UseZOrder
  16.    ScaleHeight     =   2175
  17.    ScaleWidth      =   5280
  18.    ShowInTaskbar   =   0   'False
  19.    Begin VB.CommandButton cmdCancel 
  20.       Cancel          =   -1  'True
  21.       Caption         =   "Cancel"
  22.       Height          =   345
  23.       Left            =   4005
  24.       TabIndex        =   3
  25.       Top             =   630
  26.       Width           =   1125
  27.    End
  28.    Begin VB.CommandButton cmdOK 
  29.       Caption         =   "OK"
  30.       Default         =   -1  'True
  31.       Enabled         =   0   'False
  32.       Height          =   345
  33.       Left            =   4005
  34.       TabIndex        =   2
  35.       Top             =   180
  36.       Width           =   1125
  37.    End
  38.    Begin ComctlLib.ListView Servers 
  39.       Height          =   1470
  40.       Left            =   180
  41.       TabIndex        =   1
  42.       Top             =   510
  43.       Width           =   3645
  44.       _ExtentX        =   6429
  45.       _ExtentY        =   2593
  46.       View            =   3
  47.       LabelEdit       =   1
  48.       LabelWrap       =   -1  'True
  49.       HideSelection   =   0   'False
  50.       HideColumnHeaders=   -1  'True
  51.       _Version        =   327682
  52.       SmallIcons      =   "imgAddresses"
  53.       ForeColor       =   -2147483640
  54.       BackColor       =   -2147483643
  55.       Appearance      =   1
  56.       NumItems        =   1
  57.       BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
  58.          Key             =   ""
  59.          Object.Tag             =   ""
  60.          Text            =   ""
  61.          Object.Width           =   2540
  62.       EndProperty
  63.    End
  64.    Begin ComctlLib.ImageList imgAddresses 
  65.       Left            =   4155
  66.       Top             =   1230
  67.       _ExtentX        =   1005
  68.       _ExtentY        =   1005
  69.       BackColor       =   -2147483643
  70.       ImageWidth      =   16
  71.       ImageHeight     =   16
  72.       MaskColor       =   12632256
  73.       _Version        =   327682
  74.       BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
  75.          NumListImages   =   1
  76.          BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
  77.             Picture         =   "Discon.frx":014A
  78.             Key             =   ""
  79.          EndProperty
  80.       EndProperty
  81.    End
  82.    Begin VB.Label lblGeneric 
  83.       BackStyle       =   0  'Transparent
  84.       Caption         =   "&Server:"
  85.       Height          =   255
  86.       Left            =   180
  87.       TabIndex        =   0
  88.       Top             =   180
  89.       Width           =   1545
  90.    End
  91. Attribute VB_Name = "Disconnect"
  92. Attribute VB_GlobalNameSpace = False
  93. Attribute VB_Creatable = False
  94. Attribute VB_PredeclaredId = True
  95. Attribute VB_Exposed = False
  96. Option Explicit
  97. '<Public>---------------------------------------------
  98. Public PressedOK    As Boolean
  99. Public ServersNode  As Node
  100. Public Alias        As String
  101. '</Public>--------------------------------------------
  102. Private Sub cmdCancel_Click()
  103.     PressedOK = False
  104.     Unload Me
  105. End Sub
  106. Private Sub cmdOK_Click()
  107.     Alias = Servers.SelectedItem.Text
  108.     PressedOK = True
  109.     Unload Me
  110. End Sub
  111. Private Sub Form_Load()
  112.     Dim WorkingNode     As Node
  113.     Dim i               As Integer
  114.     Dim NumberChildren  As Integer
  115.     NumberChildren = ServersNode.Children
  116.     If NumberChildren <> 0 Then
  117.         cmdOK.Enabled = True
  118.         For i = 1 To NumberChildren
  119.             If (i = 1) Then
  120.                 Set WorkingNode = ServersNode.Child
  121.             Else
  122.                 Set WorkingNode = WorkingNode.Next
  123.             End If
  124.         
  125.             Call Servers.ListItems.Add(, , WorkingNode.Text, , 1)
  126.         Next
  127.     Else
  128.         cmdOK.Enabled = False
  129.     End If
  130.     Set WorkingNode = Nothing
  131.     CenterForm Me
  132. End Sub
  133. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  134.     If (Not (UnloadMode = vbFormCode)) Then
  135.         PressedOK = False
  136.     End If
  137.     Set ServersNode = Nothing
  138. End Sub
  139.